package com.woniuxy.dr_mall.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniuxy.dr_mall.entity.DrLog;
import org.apache.ibatis.annotations.One;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.mapping.FetchType;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 张哲轩
 * @since 2021-08-11
 */
public interface DrLogMapper extends BaseMapper<DrLog> {

    @Select("select * from dr_log")
    @Results({
            @Result(column = "managerId",property = "manager",one = @One(
                    fetchType = FetchType.LAZY,
                    select = "com.woniuxy.dr_mall.mapper.DrManagerMapper.getById"
            ))
    })
    List<DrLog> getRecords();
}
